package com.ruoyi.web.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.domain.MinioFile;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author 11610
* @description 针对表【file】的数据库操作Service
* @createDate 2025-04-04 22:14:07
*/
public interface MinioFileService extends IService<MinioFile> {

    /**
     * 保存文件信息
     * @param fileName
     * @param md5
     */
    MinioFile saveFile(String fileName, String md5);

    AjaxResult uploadReport(MultipartFile file, String md5);

    AjaxResult checkFile(String md5, String fileName);

    void download(String saveFileName, HttpServletResponse response, HttpServletRequest request) throws Exception;

    AjaxResult deleteById(String fileId);

    AjaxResult deleteByIds(List<String> fileIds);
}
